package cn.accp.mvc.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.accp.mvc.dao.StreetDao;
import cn.accp.mvc.entity.Street;
@Repository("streetDao")
public class StreetDaoImpl extends SqlSessionDaoSupport implements StreetDao {
	@Autowired
	@Override
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		super.setSqlSessionFactory(sqlSessionFactory);
	}

	@Override
	public List<Street> getAllStreet() {
		List<Street> streetList = getSqlSession().selectList("getStreet");
		return streetList;
	}

	@Override
	public Street getStreet(Short id) {
		return null;
	}

}
